Micron Document
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| SparkN0de-git | SparkN0de |
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


Commit 6866d97cf64b7cdbb9e785034da20eea73e2df03


Parents : ce8eec1
Author : Mark Qvist <mark@unsigned.io>
Date : 2026-04-06T18:47:06+02:00

True-color support

Changes

1 files changed, 16 insertions(+), 6 deletions(-)


Diff

diff --git a/nomadnet/ui/textui/MicronParser.py b/nomadnet/ui/textui/MicronParser.py
index d8adbb4..a53e614 100644
--- a/nomadnet/ui/textui/MicronParser.py
+++ b/nomadnet/ui/textui/MicronParser.py
@@ -498,16 +498,26 @@ def make_output(state, line, url_delegate, pre_escape=False):
state["formatting"]["italic"] ^= True
elif c == "F":
if len(line) >= i+4:
- color = line[i+1:i+4]
- state["fg_color"] = color
- skip = 3
+ if line[i+1] == "T" and len(line) >= i+8:
+ color = line[i+2:i+8]
+ state["fg_color"] = color
+ skip = 7
+ else:
+ color = line[i+1:i+4]
+ state["fg_color"] = color
+ skip = 3
elif c == "f":
state["fg_color"] = state["default_fg"]
elif c == "B":
if len(line) >= i+4:
- color = line[i+1:i+4]
- state["bg_color"] = color
- skip = 3
+ if line[i+1] == "T" and len(line) >= i+8:
+ color = line[i+2:i+8]
+ state["bg_color"] = color
+ skip = 7
+ else:
+ color = line[i+1:i+4]
+ state["bg_color"] = color
+ skip = 3
elif c == "b":
state["bg_color"] = state["default_bg"]
elif c == "`":


──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────